// 查询礼品专区可兑换商品
export const getCardProListApi = async (params) => {
	const {
		data: res
	} = await uni.$http.get(`/api/rechargeCard/miniapp/CardProductRspDto?
	enterpriseCode=${params.enterpriseCode}&pageNum=${params.pageNum}&pageSize=${params.pageSize}&projectCode=${params.projectCode}`)
	return res
}

//校验并兑换充值卡(充值卡直接兑换到余额,礼品卡返回对应商品根据返回商品下单)
export const exchangeApi = async (params) => {
	const {
		data: res
	} = await uni.$http.post(`/api/rechargeCard/miniapp/exchange?cardCode=${params.cardCode}&cardPassword=${params.cardPassword}`)
	return res
}

//查看当前用户充值卡使用记录
export const getCardUseRecordApi = async (params) => {
	const {
		data: res
	} = await uni.$http.get(`/api/rechargeCard/miniapp/queryRechargeCardUseRecord?pageNum=${params.pageNum}&pageSize=${params.pageSize}`)
	return res
}

// 个人余额使用明细
export const getCoinCardRecordApi = async (params) => {
	const {
		data: res
	} = await uni.$http.get(`/api/rechargeCard/miniapp/queryRechargeCoinCardRecord?pageNum=${params.pageNum}&pageSize=${params.pageSize}`)
	return res
}

// 根据卡号查询充值卡
export const queryByCodeApi = async (cardCode) => {
	const {
		data: res
	} = await uni.$http.get(`/api/rechargeCard/miniapp/queryByCode?cardCode=${cardCode}`)
	return res
}
